In this example, we are going to determine the formula of the area of an irregular shape made up of a circle and a rectangle:
The only additional information we are given is this: the total external perimeter of the shape is 20 feet.
Conceptually, the problem is relatively straightforward: the total area is the area of the half-circle (usually called a semicircle) added to the area of the rectangle. The semicircle we actually already know: \(A_{c} = \frac{1}{2}\pi r^2\). The rectangle is where things get more tricky. Look closely at the top of the rectangle and convince yourself of this: the top length of the rectangle is \(2r\). If the top of the rectangle is \(2r\), then so to must the the bottom be. That leaves the left and right (both the same) as some unknown. Let's call the unknown left/right values \(h\) (since it is kind of a height):
From this, we can see the most of the exterior pieces of the perimeter. Note that the bottom of the circle (the top of the rectangle) is not included in the perimeter. The total perimeter then must be made up of the 3 sides of the rectangle and the circumference of the semicircle: \[P = 2r + h +h +\frac{1}{2}(2\pi r) = 2r+2h + \pi r\]
From this formula, we can substitute the known value of the perimeter, 20 feet, and use that to solve for \(h\), thus eliminating the "extra" variable we introduced into this problem: \[\solve{ 20 &=&2r + 2h + \pi r\\ 20-2r-\pi r &=& 2 h \\ 10 - r -\frac{\pi}{2}r &=& h } \]
Known \(h\) in terms of \(r\), we can now return to our original idea for the area by adding the area of the semicircle with the area of the rectangle: \[ \solve{ A &=& \frac{1}{2}\pi r^2 + (2r)(h)\\ A &=& \frac{1}{2}\pi r^2 + (2r)(10-r-\frac{\pi}{2}r)\\ A &=& \frac{1}{2}\pi r^2 + 20r - 2r^2 - \pi r^2\\ A &=& -2r^2 - \frac{\pi}{2} r^2 +20r\\ A &=& -r^2(2+\frac{\pi}{2})+20r } \]
This final statement can be rewritten a few way that are all equally correct; the final steps involve rearranging the values, notably combining all the \(\pi r^2\) terms(\(1/2 - 1\) becomes \(-1/2\) just with \(\pi r^2\)).